Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change array permissions to contain shapes #1484

Merged
merged 107 commits into from
Oct 19, 2021

Conversation

eddywestbrook
Copy link
Contributor

This PR changes LLVM array pointer permissions each array cell is described by an arbitrary LLVM shape, rather than as a sequence of field permissions.

Eddy Westbrook added 30 commits August 31, 2021 12:27
…made the translation of bitvector permissions to just be bitvectors
… be converted to unit, not to the empty struct
…a HeapsterEnv into a single function which iterates through the globals and adds those it can handle
…macro, because that seems to be the proper way to do things
…ons with different fields using the SImpl_LLVMArrayContents rule; to get the translation of the SImpl_LLVMArrayContents to work correctly, I had to change local implications to not use strict tuples, which in turn required changing the translation of lowned permissions (which are themselves local implications) to not use strict tuples as well
Eddy Westbrook added 20 commits September 24, 2021 07:49
…-conjunctive permissions returned by implElimLLVMBlock; added pretty-printing and typing information for the names bound by local implications
…e local implication used to prove array contents!
…nerate the sub-array being borrowed, and to only take the borrows from the larger array that could overlap with the sub-array; Added cases to prove field permissions from arrays of smaller strides; added more debug information
…t from the sub-array instead of those the could overlap with it
… a tag first, thereby reducing the cases in which they bottom out into general disjunctions
…tImplBlock delete all the BVRanges of perms on the left-hand size from the BVRange of the right-hande side, and then creating blocks with existentially-quantified shapes for those ranges
…lockPermToField and llvmBlockPermToArray, because these do not take the current partial substitution into account
@m-yac m-yac added the subsystem: heapster Issues specifically related to memory verification using Heapster label Oct 19, 2021
@m-yac m-yac mentioned this pull request Oct 19, 2021
3 tasks
Copy link
Contributor

@m-yac m-yac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, with the caveat that I really only glanced through large portions of the changes in Permissions.hs and SAWTranslation.hs as well as basically all of Implication.hs, simply because I'm not comfortable enough with what happens in these files to understand the changes being made. That being said, my understanding that is for a lot of the changes in this PR, there was only one way to adapt the existing code to use the new form of arrays. Plus, all the array examples work, which is the benchmark for correctness at the moment.

@eddywestbrook eddywestbrook added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Oct 19, 2021
@eddywestbrook eddywestbrook merged commit 156e9d6 into master Oct 19, 2021
@mergify mergify bot deleted the heapster-shapes-in-arrays branch October 19, 2021 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run subsystem: heapster Issues specifically related to memory verification using Heapster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants